<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreatePlanTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('plan', function (Blueprint $table) {
            $table->increments('id')->comment('id');
            $table->string('title')->nullable()->comment('计划名称');
            $table->timestamp('start_time')->nullable()->comment('计划开始时间');
            $table->timestamp('end_time')->nullable()->comment('计划结束时间');
            $table->integer('select_num')->default(0)->comment('计划结束时间');
            $table->timestamp('select_time')->nullable()->comment('计划结束时间');
            $table->integer('all_num')->default(0)->comment('所有报名人数');
            $table->integer('invent_num')->default(0)->comment('虚拟人数');
            $table->decimal('amount')->default(0)->comment('会员金额');
            $table->text('content')->nullable()->comment('内容');
            $table->integer('status')->default(0)->comment('计划状态，0：未开启，1：开启');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
